<?php

namespace app\admin\validate;

use think\Validate;

/**
 * Created by PhpStorm.
 * User: HuangLuSen
 * Date: 2017/5/4
 * Time: 19:36
 */
class State extends Validate
{
    protected $rule = [
        'name' => 'require|unique:State|token',
    ];
    protected $message = [
        'name.require' => '状态名称不能为空',
        'name.unique' => '状态名称不能重复',
    ];
    protected $scene = [
        'edit'  =>  [
            'name'=>'require|unique:State,name^id|token',
        ]
    ];

}